Optimal. Leaf size=104 \[ \frac {a^2 (b c-a d) (a+b x)^{1+n}}{b^4 (1+n)}-\frac {a (2 b c-3 a d) (a+b x)^{2+n}}{b^4 (2+n)}+\frac {(b c-3 a d) (a+b x)^{3+n}}{b^4 (3+n)}+\frac {d (a+b x)^{4+n}}{b^4 (4+n)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 104, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 1, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {78}
\begin {gather*} \frac {a^2 (b c-a d) (a+b x)^{n+1}}{b^4 (n+1)}-\frac {a (2 b c-3 a d) (a+b x)^{n+2}}{b^4 (n+2)}+\frac {(b c-3 a d) (a+b x)^{n+3}}{b^4 (n+3)}+\frac {d (a+b x)^{n+4}}{b^4 (n+4)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 78
Rubi steps
\begin {align*} \int x^2 (a+b x)^n (c+d x) \, dx &=\int \left (-\frac {a^2 (-b c+a d) (a+b x)^n}{b^3}+\frac {a (-2 b c+3 a d) (a+b x)^{1+n}}{b^3}+\frac {(b c-3 a d) (a+b x)^{2+n}}{b^3}+\frac {d (a+b x)^{3+n}}{b^3}\right ) \, dx\\ &=\frac {a^2 (b c-a d) (a+b x)^{1+n}}{b^4 (1+n)}-\frac {a (2 b c-3 a d) (a+b x)^{2+n}}{b^4 (2+n)}+\frac {(b c-3 a d) (a+b x)^{3+n}}{b^4 (3+n)}+\frac {d (a+b x)^{4+n}}{b^4 (4+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.10, size = 87, normalized size = 0.84 \begin {gather*} \frac {(a+b x)^{1+n} \left (\frac {a^2 (b c-a d)}{1+n}+\frac {a (-2 b c+3 a d) (a+b x)}{2+n}+\frac {(b c-3 a d) (a+b x)^2}{3+n}+\frac {d (a+b x)^3}{4+n}\right )}{b^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(211\) vs.
\(2(104)=208\).
time = 0.08, size = 212, normalized size = 2.04
method | result | size |
norman | \(\frac {d \,x^{4} {\mathrm e}^{n \ln \left (b x +a \right )}}{4+n}+\frac {\left (a d n +b c n +4 b c \right ) x^{3} {\mathrm e}^{n \ln \left (b x +a \right )}}{b \left (n^{2}+7 n +12\right )}-\frac {2 a^{3} \left (-b c n +3 a d -4 b c \right ) {\mathrm e}^{n \ln \left (b x +a \right )}}{b^{4} \left (n^{4}+10 n^{3}+35 n^{2}+50 n +24\right )}+\frac {2 n \,a^{2} \left (-b c n +3 a d -4 b c \right ) x \,{\mathrm e}^{n \ln \left (b x +a \right )}}{b^{3} \left (n^{4}+10 n^{3}+35 n^{2}+50 n +24\right )}-\frac {\left (-b c n +3 a d -4 b c \right ) a n \,x^{2} {\mathrm e}^{n \ln \left (b x +a \right )}}{b^{2} \left (n^{3}+9 n^{2}+26 n +24\right )}\) | \(212\) |
gosper | \(-\frac {\left (b x +a \right )^{1+n} \left (-b^{3} d \,n^{3} x^{3}-b^{3} c \,n^{3} x^{2}-6 b^{3} d \,n^{2} x^{3}+3 a \,b^{2} d \,n^{2} x^{2}-7 b^{3} c \,n^{2} x^{2}-11 b^{3} d n \,x^{3}+2 a \,b^{2} c \,n^{2} x +9 a \,b^{2} d n \,x^{2}-14 b^{3} c n \,x^{2}-6 b^{3} d \,x^{3}-6 a^{2} b d n x +10 a \,b^{2} c n x +6 a \,b^{2} d \,x^{2}-8 b^{3} c \,x^{2}-2 a^{2} b c n -6 a^{2} b d x +8 a \,b^{2} c x +6 a^{3} d -8 a^{2} b c \right )}{b^{4} \left (n^{4}+10 n^{3}+35 n^{2}+50 n +24\right )}\) | \(222\) |
risch | \(-\frac {\left (-b^{4} d \,n^{3} x^{4}-a \,b^{3} d \,n^{3} x^{3}-b^{4} c \,n^{3} x^{3}-6 b^{4} d \,n^{2} x^{4}-a \,b^{3} c \,n^{3} x^{2}-3 a \,b^{3} d \,n^{2} x^{3}-7 b^{4} c \,n^{2} x^{3}-11 b^{4} d n \,x^{4}+3 a^{2} b^{2} d \,n^{2} x^{2}-5 a \,b^{3} c \,n^{2} x^{2}-2 a \,b^{3} d n \,x^{3}-14 b^{4} c n \,x^{3}-6 d \,x^{4} b^{4}+2 a^{2} b^{2} c \,n^{2} x +3 a^{2} b^{2} d n \,x^{2}-4 a \,b^{3} c n \,x^{2}-8 b^{4} c \,x^{3}-6 a^{3} b d n x +8 a^{2} b^{2} c n x -2 a^{3} b c n +6 a^{4} d -8 a^{3} b c \right ) \left (b x +a \right )^{n}}{\left (3+n \right ) \left (4+n \right ) \left (2+n \right ) \left (1+n \right ) b^{4}}\) | \(276\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.32, size = 172, normalized size = 1.65 \begin {gather*} \frac {{\left ({\left (n^{2} + 3 \, n + 2\right )} b^{3} x^{3} + {\left (n^{2} + n\right )} a b^{2} x^{2} - 2 \, a^{2} b n x + 2 \, a^{3}\right )} {\left (b x + a\right )}^{n} c}{{\left (n^{3} + 6 \, n^{2} + 11 \, n + 6\right )} b^{3}} + \frac {{\left ({\left (n^{3} + 6 \, n^{2} + 11 \, n + 6\right )} b^{4} x^{4} + {\left (n^{3} + 3 \, n^{2} + 2 \, n\right )} a b^{3} x^{3} - 3 \, {\left (n^{2} + n\right )} a^{2} b^{2} x^{2} + 6 \, a^{3} b n x - 6 \, a^{4}\right )} {\left (b x + a\right )}^{n} d}{{\left (n^{4} + 10 \, n^{3} + 35 \, n^{2} + 50 \, n + 24\right )} b^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 251 vs.
\(2 (104) = 208\).
time = 0.70, size = 251, normalized size = 2.41 \begin {gather*} \frac {{\left (2 \, a^{3} b c n + 8 \, a^{3} b c - 6 \, a^{4} d + {\left (b^{4} d n^{3} + 6 \, b^{4} d n^{2} + 11 \, b^{4} d n + 6 \, b^{4} d\right )} x^{4} + {\left (8 \, b^{4} c + {\left (b^{4} c + a b^{3} d\right )} n^{3} + {\left (7 \, b^{4} c + 3 \, a b^{3} d\right )} n^{2} + 2 \, {\left (7 \, b^{4} c + a b^{3} d\right )} n\right )} x^{3} + {\left (a b^{3} c n^{3} + {\left (5 \, a b^{3} c - 3 \, a^{2} b^{2} d\right )} n^{2} + {\left (4 \, a b^{3} c - 3 \, a^{2} b^{2} d\right )} n\right )} x^{2} - 2 \, {\left (a^{2} b^{2} c n^{2} + {\left (4 \, a^{2} b^{2} c - 3 \, a^{3} b d\right )} n\right )} x\right )} {\left (b x + a\right )}^{n}}{b^{4} n^{4} + 10 \, b^{4} n^{3} + 35 \, b^{4} n^{2} + 50 \, b^{4} n + 24 \, b^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 2462 vs.
\(2 (92) = 184\).
time = 0.90, size = 2462, normalized size = 23.67 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 431 vs.
\(2 (104) = 208\).
time = 0.60, size = 431, normalized size = 4.14 \begin {gather*} \frac {{\left (b x + a\right )}^{n} b^{4} d n^{3} x^{4} + {\left (b x + a\right )}^{n} b^{4} c n^{3} x^{3} + {\left (b x + a\right )}^{n} a b^{3} d n^{3} x^{3} + 6 \, {\left (b x + a\right )}^{n} b^{4} d n^{2} x^{4} + {\left (b x + a\right )}^{n} a b^{3} c n^{3} x^{2} + 7 \, {\left (b x + a\right )}^{n} b^{4} c n^{2} x^{3} + 3 \, {\left (b x + a\right )}^{n} a b^{3} d n^{2} x^{3} + 11 \, {\left (b x + a\right )}^{n} b^{4} d n x^{4} + 5 \, {\left (b x + a\right )}^{n} a b^{3} c n^{2} x^{2} - 3 \, {\left (b x + a\right )}^{n} a^{2} b^{2} d n^{2} x^{2} + 14 \, {\left (b x + a\right )}^{n} b^{4} c n x^{3} + 2 \, {\left (b x + a\right )}^{n} a b^{3} d n x^{3} + 6 \, {\left (b x + a\right )}^{n} b^{4} d x^{4} - 2 \, {\left (b x + a\right )}^{n} a^{2} b^{2} c n^{2} x + 4 \, {\left (b x + a\right )}^{n} a b^{3} c n x^{2} - 3 \, {\left (b x + a\right )}^{n} a^{2} b^{2} d n x^{2} + 8 \, {\left (b x + a\right )}^{n} b^{4} c x^{3} - 8 \, {\left (b x + a\right )}^{n} a^{2} b^{2} c n x + 6 \, {\left (b x + a\right )}^{n} a^{3} b d n x + 2 \, {\left (b x + a\right )}^{n} a^{3} b c n + 8 \, {\left (b x + a\right )}^{n} a^{3} b c - 6 \, {\left (b x + a\right )}^{n} a^{4} d}{b^{4} n^{4} + 10 \, b^{4} n^{3} + 35 \, b^{4} n^{2} + 50 \, b^{4} n + 24 \, b^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.23, size = 224, normalized size = 2.15 \begin {gather*} {\left (a+b\,x\right )}^n\,\left (\frac {d\,x^4\,\left (n^3+6\,n^2+11\,n+6\right )}{n^4+10\,n^3+35\,n^2+50\,n+24}+\frac {2\,a^3\,\left (4\,b\,c-3\,a\,d+b\,c\,n\right )}{b^4\,\left (n^4+10\,n^3+35\,n^2+50\,n+24\right )}+\frac {x^3\,\left (4\,b\,c+a\,d\,n+b\,c\,n\right )\,\left (n^2+3\,n+2\right )}{b\,\left (n^4+10\,n^3+35\,n^2+50\,n+24\right )}-\frac {2\,a^2\,n\,x\,\left (4\,b\,c-3\,a\,d+b\,c\,n\right )}{b^3\,\left (n^4+10\,n^3+35\,n^2+50\,n+24\right )}+\frac {a\,n\,x^2\,\left (n+1\right )\,\left (4\,b\,c-3\,a\,d+b\,c\,n\right )}{b^2\,\left (n^4+10\,n^3+35\,n^2+50\,n+24\right )}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________